package com.ihg.hiex.admin.entity.dto;

/**
 * 
 * @author houtao
 *
 */
public class ChampionChange {
    
    private String assessorEvalution;
    
    private String internalBenchmark;
    
    private String externalBenchmark;
    
    private int ybbg;
    
    private int lgjj;
    
    private int tcxf;
    
    private int ttknx;
    
    private int sftr;
    
    private int tzgd;
    
    private int sbrts;
    
    private int zcjc;
    
    private int potential;
    
    /**
     * 
     */
    public ChampionChange() {
    }
    
    /**
     * 
     * @param ybbg
     * @param lgjj
     * @param tcxf
     * @param ttknx
     * @param sftr
     * @param tzgd
     * @param sbrts
     * @param zcjc
     */
    public ChampionChange(int ybbg, int lgjj, int tcxf,
            int ttknx, int sftr, int tzgd, int sbrts,
            int zcjc) {
        
    	this.ybbg = ybbg;
    	this.lgjj = lgjj;
    	this.tcxf = tcxf;
    	this.ttknx = ttknx;
    	this.sftr = sftr;
    	this.tzgd = tzgd;
    	this.sbrts = sbrts;
    	this.zcjc = zcjc;
    	
        double po = (lgjj + tcxf + ttknx + sftr + tzgd + sbrts + zcjc)* 0.111111111
                + (ybbg) * 0.2222222; 
        //this.potential = new Double(po).intValue();
        
        if(po > new Double(6.88)) {
    		this.potential = new Integer(10);
    	} else if (po > new Double(6.50)) {
    		this.potential = new Integer(9);
    	} else if (po > new Double(6.25)) {
    		this.potential = new Integer(8);
    	} else if (po > new Double(5.88)) {
    		this.potential = new Integer(7);
    	} else if (po > new Double(5.50)) {
    		this.potential = new Integer(6);
    	} else if (po > new Double(5.13)) {
    		this.potential = new Integer(5);
    	} else if (po > new Double(4.75)) {
    		this.potential = new Integer(4);
    	} else if (po > new Double(4.50)) {
    		this.potential = new Integer(3);
    	} else if (po > new Double(4.13)) {
    		this.potential = new Integer(2);
    	} else {
    		this.potential = new Integer(1);
    	}
    }
    
    /**
     * 
     * @param assessorEvalution
     * @param internalBenchmark
     * @param externalBenchmark
     * @return
     */
    public ChampionChange init(String assessorEvalution, String internalBenchmark, String externalBenchmark) {
        this.assessorEvalution = assessorEvalution;
        this.internalBenchmark = internalBenchmark;
        this.externalBenchmark = externalBenchmark;
        return this;
    }
    
    /**
     * 
     * @param ybbg
     * @param lgjj
     * @param tcxf
     * @param ttknx
     * @param sftr
     * @param tzgd
     * @param sbrts
     * @param zcjc
     * @return
     */
    public ChampionChange init(int ybbg, int lgjj, int tcxf,
            int ttknx, int sftr, int tzgd, int sbrts,
            int zcjc) {
    	this.ybbg = ybbg;
    	this.lgjj = lgjj;
    	this.tcxf = tcxf;
    	this.ttknx = ttknx;
    	this.sftr = sftr;
    	this.tzgd = tzgd;
    	this.sbrts = sbrts;
    	this.zcjc = zcjc;
    	
        double po = (lgjj + tcxf + ttknx + sftr + tzgd + sbrts + zcjc)* 0.111111111
                + (ybbg) * 0.2222222;  
        //this.potential = new Double(po).intValue();
        
        if(po > new Double(6.88)) {
    		this.potential = new Integer(10);
    	} else if (po > new Double(6.50)) {
    		this.potential = new Integer(9);
    	} else if (po > new Double(6.25)) {
    		this.potential = new Integer(8);
    	} else if (po > new Double(5.88)) {
    		this.potential = new Integer(7);
    	} else if (po > new Double(5.50)) {
    		this.potential = new Integer(6);
    	} else if (po > new Double(5.13)) {
    		this.potential = new Integer(5);
    	} else if (po > new Double(4.75)) {
    		this.potential = new Integer(4);
    	} else if (po > new Double(4.50)) {
    		this.potential = new Integer(3);
    	} else if (po > new Double(4.13)) {
    		this.potential = new Integer(2);
    	} else {
    		this.potential = new Integer(1);
    	}
        
        return this;
    }

	public String getAssessorEvalution() {
		return assessorEvalution;
	}

	public void setAssessorEvalution(String assessorEvalution) {
		this.assessorEvalution = assessorEvalution;
	}

	public String getInternalBenchmark() {
		return internalBenchmark;
	}

	public void setInternalBenchmark(String internalBenchmark) {
		this.internalBenchmark = internalBenchmark;
	}

	public String getExternalBenchmark() {
		return externalBenchmark;
	}

	public void setExternalBenchmark(String externalBenchmark) {
		this.externalBenchmark = externalBenchmark;
	}

	public int getYbbg() {
		return ybbg;
	}

	public void setYbbg(int ybbg) {
		this.ybbg = ybbg;
	}

	public int getLgjj() {
		return lgjj;
	}

	public void setLgjj(int lgjj) {
		this.lgjj = lgjj;
	}

	public int getTcxf() {
		return tcxf;
	}

	public void setTcxf(int tcxf) {
		this.tcxf = tcxf;
	}

	public int getTtknx() {
		return ttknx;
	}

	public void setTtknx(int ttknx) {
		this.ttknx = ttknx;
	}

	public int getSftr() {
		return sftr;
	}

	public void setSftr(int sftr) {
		this.sftr = sftr;
	}

	public int getTzgd() {
		return tzgd;
	}

	public void setTzgd(int tzgd) {
		this.tzgd = tzgd;
	}

	public int getSbrts() {
		return sbrts;
	}

	public void setSbrts(int sbrts) {
		this.sbrts = sbrts;
	}

	public int getZcjc() {
		return zcjc;
	}

	public void setZcjc(int zcjc) {
		this.zcjc = zcjc;
	}

	public int getPotential() {
		return potential;
	}

	public void setPotential(int potential) {
		this.potential = potential;
	}
}
